/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUI;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;

/**
 *
 * @author cesar
 */
public class PrincipalOperario extends JFrame{

    public PrincipalOperario() {
        setSize(600, 350);
        setTitle("Sistema Academico");

        final PanelView pestana1 = new PanelView();
        final PanelView pestana2 = new PanelView();
        final PanelView pestana3 = new PanelView();


        pestana1.set(new fmrPeriodoAcademico());
        pestana2.set(new fmrRegistroGrupo());

        final fmrAvanceCurricular_bus_alumno nolo1 = new fmrAvanceCurricular_bus_alumno();
        final fmrAvanceCurricular_operario nolo2 = new fmrAvanceCurricular_operario();

        nolo1.getBuscar().addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                pestana3.set(nolo2);
            }
        });
        nolo2.getTerminar().addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                pestana3.set(nolo1);
            }
        });
        pestana3.set(nolo1);
        String cod = "";
        String perfil = "";

        JTabbedPane menu = new JTabbedPane();
        menu.add(new FmrInicio(cod,perfil),"Inicio");
        menu.add(pestana1, "Periodo académico");
        menu.add(pestana2, "Registro de Grupos");
        menu.add(pestana3, "Avance curricular alumno");
        add(menu);

    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        PrincipalOperario m = new PrincipalOperario();
        m.setVisible(true);
    }
}
